{*include file="template/admin_head.htm"*}

<table width="100%" cellpadding="0" cellspacing="0" id="containtable">
<tr>
        <td valign="top" bgcolor="#FFFFFF">
           <!-- <div class="pannel">
                <div class="pl"></div>
                <div class="pr"></div>
                <div class="pc1">
                    <form action="" method="post" id="search_form" name="search_form">
                        <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                        <div class="pt">
                            
					标题名称:<input type="text" size="12" id="stitle" name="stitle" class="tet" />&nbsp;&nbsp;
                            <input type="image" src="public/images/admin/icon_search_btn.gif">
                        </div>
                    </form>
                </div>
            </div>-->

            <div class="wrapper">
                {*if $cf_action=='add' || $cf_action=='edit'*}
                <script type="text/javascript">
                    $(function(){
                        $("#act_form").submit(function(){
                            if($("#cate_title").val()==''){
                                my_alert('请输入名称','Error',"$('#cate_title').focus()");
                                return false;
                            }
                        });
                    })

                </script>

                <div class="content_panel_title">
                <div class="contentpanelleft"></div>
                <div class="contentpanelcenter">
                    <span class="contentpanelcenter_font">新增/修改分类</span><span><a class="edit at" href="{*$cf_self_page*}">商品分类管理</a></span>                </div>
                <div class="contentpanelrihgt"></div>
            </div>
                <div class="content_table_center_style">
                	<div class="p8">
                    <form name="act_form" id="act_form" method="post" action="{*$cf_self_page*}">
                        <input name="id" id="id" type="hidden" value="{*$row['cate_id']*}" />
                        <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                        <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
                            <tbody>
                                <tr>
                                    <td width="15%" align="right">父栏目: </td>
                          <td width="85%" align="left">{*html_options name=cate_pid options=$options selected=$row['cate_pid']|default:'0'*}</td>
                                </tr>
                                <tr>
                                    <td align="right">标题:</td>
                                    <td align="left"><input name="cate_title" type="text" id="cate_title" value="{*$row['cate_title']*}" size="25" maxlength="20" /></td>
                                </tr>
<!--                                <tr>
                                    <td align="right">窗口打开方式:</td>
                                    <td align="left">{*html_radios name=cate_target options=$cf_info_var.1 checked=$row['cate_target']|default:''*}</td>
                                </tr>-->
                                <tr>
                                    <td align="right">排序:</td>
                                    <td align="left"><input name="cate_order" type="text" id="cate_order" value="{*$row['cate_order']|default:999*}" size="3" maxlength="3" />
                                    	&nbsp;<span class="red">0是最前</span></td>
                                </tr>
                                <tr>
                                    <td align="right">是否显示:</td>
                                    <td align="left">{*html_radios name=cate_show options=$cf_info_var_common['yesno'] checked=$row['cate_show']|default:'1'*}</td>
                                </tr>

                                <tr>
                                    <td colspan="2" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                        &nbsp;&nbsp;
                                        <input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></td>
                                </tr>
                            </tbody>
                        </table>
                  </form>
                </div>
            	</div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>
                {*else*}
                <script type="text/javascript">
                    $(function(){
                        $(".openpart").toggle(
                        function(){$("."+this.id).hide();$("#"+this.id).attr("src","public/images/admin/close_part.gif")},
                        function(){$("."+this.id).show();$("#"+this.id).attr("src","public/images/admin/open_part.gif")}
                        )
                    })
                </script>
                <div class="content_panel_title">
                <div class="contentpanelleft"></div>
                <div class="contentpanelcenter">
                    <span class="contentpanelcenter_font">商品分类管理</span><span><a class="edit at" href="{*$cf_self_path*}-act_add.htm?dpt={*$cf_dpt*}">新增菜单</a></span>                </div>
                <div class="contentpanelrihgt"></div>
            </div>
                <div class="content_table_center_style">
                	<div class="p8">
                    <table width="100%" class="tbl tbl_nbr">
                        <thead>
                            <tr class="thd">
                                <td width="7%" align="center">ID</td>
                                <td width="29%" align="center" class="thr">栏目标题</td>
                                <td width="16%" align="center" class="thr">排序</td>
                                <td width="15%" align="center" class="thr">是否显示</td>
                                <td colspan="3" align="center" class="thr">操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            {*foreach $data_array as $item*}
                       
                            {*assign var=show value=$item['cate_show']*}
                            {*assign var=part value='part-'|cat:$item['cate_id']*}
                            <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                                <td align="center">{*$item['cate_id']*}</td>
                                <td><img src="public/images/admin/open_part.gif" class="openpart" id="{*$part*}" align="absmiddle" alt="" />{*$item['cate_title']*}</td>
                                <td align="center">{*$item['cate_order']*}</td>
                                <td align="center">{*$cf_info_var_common.yesno.$show*}</td>
                                <td width="11%" align="center"><a href="{*$cf_self_path*}-act_add_pid_{*$item['cate_id']*}.htm?dpt={*$cf_dpt*}">新增子项</a></td>
                                <td width="11%" align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item['cate_id']*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
                                <td width="11%" align="center"><!--{*if $item['cate_id']>1*}<a href="{*$cf_self_path*}-act_del_id_{*$item['cate_id']*}.htm?dpt={*$cf_dpt*}" class="del" onclick="return confirm('你确定要删除吗?')">删除</a>{*/if*}--></td>
                            </tr>
                            {*foreach $item['child'] as $item2*}
                  	
               	 	{*assign var=show value=$item2['cate_show']*}
                            <tr class="{*$part*}"  onmouseout="this.style.backgroundColor='#fff'" onmouseover="this.style.backgroundColor='#ffc'" style=" background-color:#ffffff">
                                <td align="center">{*$item2['cate_id']*}</td>
                                <td>&nbsp;&nbsp;&nbsp;├ {*$item2['cate_title']*}</td>
                                <td align="center">{*$item2['cate_order']*}</td>
                                <td align="center">{*$cf_info_var_common.yesno.$show*}</td>
                                <td align="center">&nbsp;</td>
                                <td align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item2['cate_id']*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
                                <td align="center"><!--<a href="{*$cf_self_path*}-act_del_id_{*$item2['cate_id']*}.htm?dpt={*$cf_dpt*}" class="del" onclick="return confirm('你确定要删除吗?')">删除</a>--></td>
                            </tr>
                           
                            {*/foreach*}
                            {*/foreach*}


                        </tbody>
                    </table>
                </div>
            	</div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>

                {*/if*}
            </div>


           
            
                      </td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}


